﻿using System;
using System.Collections.Generic;
using System.Data.Linq;
using System.Linq;
using System.Text;
using RuTracker.Interface;
using RuTracker.WebSite.DbLayer;

namespace RuTrackerWebSiteTests
{
    public static class DbFacade
    {
        public static void ClearDb()
        {
            using (DataClassesDataContext context = new DataClassesDataContext(Settings.ConnectionString))
            {
                context.UserStorageInfos.DeleteAllOnSubmit(context.UserStorageInfos);
                context.Users.DeleteAllOnSubmit(context.Users);

                context.SubmitChanges(ConflictMode.ContinueOnConflict);
            }
        }
    }
}
